package com.feibiao.computer;

import java.util.Scanner;

public class ADD implements TwoOperandCompute {

    private double result;

    @Override
    public double compute() {
        double operand1,operand2;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入被加数");
        operand1 = scanner.nextDouble();
        System.out.println("请输入加数");
        operand2 = scanner.nextDouble();
        result = operand1 + operand2;
        return result;
    }

}
